<%@page import="transfer.User"%>
<%@page import="content.GroupContent"%>
<%@page import="transfer.Group"%>
<%
    Integer groupId = new Integer(request.getParameter("id"));
    Group group = GroupContent.getGroup(groupId);
%>
<div class="box" id="group_id" value="<%= groupId %>">
    <table class="table-admin" rules=all>
        <tr>
            <td colspan="2" style="text-align: left;">View group</td>
        </tr>
        <tr>
            <td>Name</td>
            <td><%=group.getNameGroup()%></td>
        </tr>
        <tr>
            <td>Members</td>
            <td>
                <%
                    for (int j = 0; j < group.getUsers().size(); j++) {
                        User user = (User) group.getUsers().get(j);
                        out.print(user.getLogin());
                        if (j < group.getUsers().size() - 1) {
                            out.print(", ");
                        }
                    }
                %>
            </td>
        </tr>
    </table>
</div>